package com.keti.controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.keti.Dao.ApplyReceiveDao;
import com.keti.DaoImpl.ApplyReceiveDaoImpl;
import com.keti.pojo.ApplyReceive;


/**
 * Servlet implementation class ShowApplyReceiveServlet
 */
@WebServlet("/ShowApplyReceiveServlet")
public class ShowApplyReceiveServlet extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		ApplyReceiveDao ard = new ApplyReceiveDaoImpl();
		List<ApplyReceive> list = new ArrayList<ApplyReceive>();
		list = ard.queryAll();
		request.setAttribute("list", list);
		request.getRequestDispatcher("/jsp"
				+ "/ReceiveApplycationInterface.jsp").forward(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
